export default function () {
    //获取高德地图
    return new Promise((resolve, reject) => {
        if (window.AMap) {
            resolve(window.AMap);
        } else {
            var script = document.createElement("script");
            script.type = "text/javascript";
            script.charset = "utf-8";
            script.async = true;
            script.src =
                "https://webapi.amap.com/maps?v=1.4.15&key=85ab0eef19b5bb970faf934dbe8b45f3&callback=onLoad";
            script.onerror = reject;
            document.head.appendChild(script);
        }
        window.onLoad = () => {
            resolve(window.AMap);
        };
    });
}